<?php

/**
 * IndexController - The default controller class
 * 
 * @author
 * @version 
 */

require_once 'Zend/Controller/Action.php';

class Administrator_SummaryController extends Zend_Controller_Action 
{
	
	
	public function init(){
		

		
	}
	
	public function preDispatch()
	{
		
		$this->getHelper ('layout')->setLayout('framelayout');
		
		$this->view->addHelperPath(MY_ROOT.'/vhelpers');
		
		Zend_Controller_Action_HelperBroker::addPath(MY_ROOT.'/chelpers');
		
		$member=new CMember();
		
		if(!$member->isUser($this->_request->getModuleName(),$this->_request->getControllerName())){
			
			$this->_redirect(MY_URL.'/administrator-auth-login');
			
			return false;
			
		}
		
		return true;
		
	}

	
    public function indexAction() 
    { 	
	    	
		$item=new CItem();
		
		$bulletinArray=$item->getAllItems(0,10,'bulletin');
		
		$this->view->assign('bulletinArray',$bulletinArray);
		
		$order=new COrder();
		
		$orderArray=$order->getAllOrders(0,10,0,'');
		
		$this->view->assign('orderArray',$orderArray);
		
		$productArray=$item->getAllItems(0,10,'product');
		
		$this->view->assign('productArray',$productArray);
    }
	
	public function postAction(){
	
		//$this->_helper->viewRenderer->setNoRender();
		
		//$this->getHelper ('layout')->disableLayout ();
	
	}
    

    
}
